import java.util.*;
//当用户输入非正数时停止输入。请给出用户输入的正整数个数（默认输入个数不超过2147483647）
public class Main2 {
    public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);
        //write your code here......
        while(scanner.nextInt()>0)count++;
            System.out.println(count);


    }
}